home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 3 / ct-rom iiib.zip / ct-rom iiib / WINDOWS / UTILITY / SCHIJF / FC_20C / WWWFC1.MN_ < prev    next >
Text File  |  1992-08-12  |  16KB  |  356 lines

  1. ; Da AutoExec Section is on top here.  Actually runs before File Manager
  2. ; actually appears on the screen
  3.  
  4.         TAB=num2char(9)
  5.         CR=strcat(num2char(13),num2char(10))
  6.  
  7. Change File Commander menus   ;Edit - with notepad, the file extender macros
  8.  Edit Menu Scripts
  9.         t1=IniReadPvt("FileCmdr","MenuTitle1","FC1","WINFILE.INI")
  10.         t2=IniReadPvt("FileCmdr","MenuTitle2","FC2","WINFILE.INI")
  11.         t3=IniReadPvt("FileCmdr","MenuTitle3","FC3","WINFILE.INI")
  12.         t4=IniReadPvt("FileCmdr","MenuTitle4","FC4","WINFILE.INI")
  13.         f1=IniReadPvt("FileCmdr","MenuFile1","WWWFC1.MNU","WINFILE.INI")
  14.         f2=IniReadPvt("FileCmdr","MenuFile2","WWWFC2.MNU","WINFILE.INI")
  15.         f3=IniReadPvt("FileCmdr","MenuFile3","WWWFC3.MNU","WINFILE.INI")
  16.         f4=IniReadPvt("FileCmdr","MenuFile4","WWWFC4.MNU","WINFILE.INI")
  17.         a=strcat(f1,TAB,t1,"~",f2,TAB,t2,"~",f3,TAB,t3,"~",f4,TAB,t4)
  18.         drop(t1,t2,t3,t4,f1,f2,f3,f4)
  19.         a=TextSelect("Choose Menu to Edit",a,"~")
  20.         if a=="" then exit
  21.         b=ItemExtract(1,a,TAB)
  22.         a=FileLocate(b)
  23.         adir=FilePath(a)
  24.         DirChange(adir)
  25.         broot=FileRoot(b)
  26.         bname=strcat(broot,".BAK")
  27.         FileCopy(b,bname,@FALSE)
  28.         run("notepad.exe",b)
  29.  
  30.  Change Toplevel Menu Titles
  31.         t1=IniReadPvt("FileCmdr","MenuTitle1","FC1","WINFILE.INI")
  32.         t2=IniReadPvt("FileCmdr","MenuTitle2","FC2","WINFILE.INI")
  33.         t3=IniReadPvt("FileCmdr","MenuTitle3","FC3","WINFILE.INI")
  34.         t4=IniReadPvt("FileCmdr","MenuTitle4","FC4","WINFILE.INI")
  35.         a=strcat(t1,TAB,t2,TAB,t3,TAB,t4)
  36.         b=TextSelect("Choose Title to Change",a,TAB)
  37.         if b=="" then exit
  38.         c=ItemLocate(b,a,TAB)
  39.         d=AskLine("Menu Title Change","Old title is -> %b%%CR%Enter new title.  Use && to show hotkey.%CR%(e.g.  FC&&1 gives FC&1",b)
  40.         if d=="" then exit
  41.         IniWritePvt("FileCmdr","MenuTitle%c%",d,"WINFILE.INI")
  42.         Reload()                         ; Reload FM Extensions
  43.  
  44. ; Dialog Editor
  45. ;        run("wwwdlged.exe","")
  46.         
  47.  _Load &WIL Help File
  48.         a=IniReadPvt("WWWSetup","FileCommander","","WWW-PROD.INI") ; Get installed directory
  49.         if a!="" then a="%a%\HELP\"                 ; add HELP dir suffix
  50.         if !FileExist("%a%WIL.HLP") then a=""
  51.         WinHelp("%a%WIL.HLP","CONTENTS","")
  52.  
  53. _Bro&wse...  ;Browse hilited file
  54.         l=strcat(CurrentPath(),CurrentFile())
  55.         run("browser.exe",l)
  56.         drop(a,l)
  57.  
  58. &Edit...      ;Edit hilited file
  59.         l=CurrentFile()
  60.         if l=="" || l==" " then goto NULL
  61.         a=strscan(l,".\",0,@BACKSCAN)
  62.         if a==0 then l=strcat(l,".")
  63.         if a==0 then goto NULL
  64.         if strsub(l,a,1)!="." then l=strcat(l,".")
  65.      :NULL
  66.         run("notepad.exe",strtrim(l))
  67.         drop(a,b,l)
  68.  
  69.  
  70. File System
  71.  &Size of ENTIRE file/dir structure
  72.         tot = FileSize(FileItemize(""))
  73.         sub1 = DirItemize("")
  74.         if (tot==0 && sub1=="") then tot=FileSize(FileItemize("*.*"))
  75.                                 then sub1=DirItemize("*.*")
  76.         totdir=0
  77.         level=1
  78.         dir1=DirGet()
  79.         numdir1 = ItemCount(sub1, " ")
  80.         index1 = 0
  81.   
  82.         :loop
  83.         If index%level% == numdir%level% Then Goto upalevel
  84.         index%level% = index%level% + 1
  85.         DirChange(StrCat(dir%level%, ItemExtract(index%level%, sub%level%, " ")))
  86.         totdir=totdir+1
  87.         tot = tot + FileSize(FileItemize("*.*"))
  88.         level = level + 1
  89.         dir%level% = DirGet()
  90.         sub%level% = DirItemize("*.*")
  91.         numdir%level% = ItemCount(sub%level%, " ")
  92.         index%level% = 0
  93.         goto loop
  94.   
  95.         :upalevel
  96.         drop(dir%level%,sub%level%,index%level%,numdir%level%)
  97.         level=level-1
  98.         if level!=0 then goto loop
  99.  
  100.         :done
  101.         ; -----------
  102.         ; Termination
  103.         ; -----------
  104.         If StrLen(tot) < 9 Then tot = StrCat(StrFill("", 9 - StrLen(tot)), tot)
  105.         tot = StrCat(StrSub(tot,1,3),",",StrSub(tot,4,3),",",StrSub(tot,7,3))
  106.         tot = StrTrim(tot)
  107.         If StrSub(tot, 1, 1) == "," Then tot = StrSub(tot, 2, StrLen(tot) - 1)
  108.         tot = StrTrim(tot)
  109.         If StrSub(tot, 1, 1) == "," Then tot = StrSub(tot, 2, StrLen(tot) - 1)
  110.         tot = StrTrim(tot)
  111.         Message("%totdir% Subdirectories included", "Total size %tot% bytes.")
  112.         drop(tot,level,totdir)
  113.  
  114.  File &Info    ; Display information on hilited files
  115.         a=FileItemize("")
  116.         if a=="" then a=FileItemize("*.*")
  117.         tot=FileSize(a)
  118.         c=ItemCount(a," ")
  119.         n=0
  120.         b=""
  121.         :loop
  122.         if n==c then goto show
  123.         n=n+1
  124.         a1=StrFix(ItemExtract(n,a," ")," ",14)
  125.         a2=FileSize(a1)
  126.         a3=FileTimeGet(a1)
  127.         a4=FileAttrGet(a1)
  128.         b=strcat(b,a1,tab,a2,tab,a3,tab,a4,"|")
  129.         goto loop
  130.         :show
  131.         ItemSelect("Total Size=%tot%",b,"|")
  132.         :cancel
  133.         drop(a,tot,c,n,a1,a2,a3,a4,b)
  134.  
  135.  &Freespace on Local Drives
  136.         Drives=DiskScan(2)     ; 2 is the code for local hard drives
  137.         Dmax=strlen(Drives)
  138.         DIndex=1
  139.         TotalSize=0
  140.         DriveReport=""
  141.  
  142.         :COUNTSPACE
  143.         NextDrive=StrSub(Drives,Dindex,1)
  144.         a=DiskFree(NextDrive)/1024
  145.         TotalSize=a+TotalSize
  146.         DriveReport=strcat(DriveReport,NextDrive," = ",TAB,a,"K",TAB,strfill("|",(a+500)/1000),"@")
  147.         DIndex=Dindex+3  ;each entry is 3 bytes long
  148.         if DIndex<=Dmax then goto COUNTSPACE
  149.         ItemSelect("Total Space Available = %TotalSize%K",DriveReport,"@")
  150.         Drop(TotalSize,DriveReport,Drives,NextDrive)
  151.  
  152.  Floppy Space and selected files
  153.   A:
  154.         message(strcat("Drive A ",DiskFree("A")),strcat("Selected Files ",FileSize(FileItemize(""))))
  155.   B:
  156.         message(strcat("Drive B ",DiskFree("B")),strcat("Selected Files ",FileSize(FileItemize(""))))
  157.  
  158.  
  159. Clipboard Tricks
  160.  Path and Filename to Clipboard
  161.         Clipput(strcat(DirGet(),CurrentFile()))
  162.  Copy &Directory to Clipboard
  163.         a=FileItemize("*.*")
  164.         a=ItemSort(a," ")
  165.         a=StrReplace(a," ",cr)
  166.         ClipPut(a)
  167.         Drop(a)
  168.  Copy &Hilited files to Clipboard
  169.         a=FileItemize("")
  170.         a=ItemSort(a," ")
  171.         a=StrReplace(a," ",cr)
  172.         ClipPut(a)
  173.         Drop(a)
  174.  Copy &Hilited dirs to Clipboard
  175.         a=DirItemize("")
  176.         a=ItemSort(a," ")
  177.         a=StrReplace(a," ",cr)
  178.         ClipPut(a)
  179.         Drop(a)
  180.  Run Character Mapper
  181.         Run("charmap.exe","")
  182.  Copy &Special Characters to Clipboard
  183.        a=" í| ó| ú| ñ| Ñ| ª| º| ¿| ⌐| ¬|"       ;161 thru 170
  184.        b=" ½| ¼| ¡| «| »| ░| ▒| ▓| │| ┤|"       ;171 thru 180
  185.        c=" ╡| ╢| ╖| ╕| ╣| ║| ╗| ╝| ╜| ╛|"       ;181 thru 190
  186.        d=" ┐| └| ┴| ┬| ├| ─| ┼| ╞| ╟| ╚|"       ;191 thru 200
  187.        e=" ╔| ╩| ╦| ╠| ═| ╬| ╧| ╨| ╤| ╥|"       ;201 thru 210
  188.        f=" ╙| ╘| ╒| ╓| ╫| ╪| ┘| ┌| █| ▄|"       ;211 thru 220
  189.        g=" ▌| ▐| ▀| α| ß| Γ| π| Σ| σ| µ|"       ;221 thru 230
  190.        h=" τ| Φ| Θ| Ω| δ| ∞| φ| ε| ∩| ≡|"       ;231 thru 240
  191.        i=" ±| ≥| ≤| ⌠| ⌡| ÷| ≈| °| ∙| ·|"       ;241 thru 250
  192.        j=" √| ⁿ| ²| ■|  "                       ;251 thru 255
  193.        a=strcat(a,b,c,d,e,f,g,h,i,j)
  194.        Drop(b,c,d,e,f,g,h,i,j)
  195.        a=ItemSelect("Choose a character",a,"|")
  196.        a=strsub(a,2,1)
  197.        ClipPut(a)
  198.        Drop(a)
  199.  _Start Clipboard
  200.        run("clipbrd.exe","")
  201.  
  202. |Applications
  203.  Ami Pro (Lotus)
  204.         a=FileLocate("amipro.exe")                      ; Try brute force path search
  205.         if a=="" then a=IniRead("extensions","sam","")  ; No? Try via [extensions] section
  206.         terminate(a=="","Error","AmiPro not found")     ; Not installed normally
  207.         b=strindex(a," ",0,@FWDSCAN)                    ; Find first space
  208.         if b==0 then b=strlen(a)+1                      ; None? ...adjust b
  209.         b=strsub(a,1,b-1)                               ; Pick off ^.sam stuff
  210.         run(b,"")                                       ; Run AmiPro
  211.  
  212.  Corel Draw! (Corel)
  213.         a=IniRead("CorelDraw","Dir","")                 ; Try via INI file info
  214.         terminate(a=="","Error","Corel Draw not found") ; Not installed normally
  215.         a=strcat(a,"\coreldrw.exe")
  216.         run(a,"")                                       ;Corel Drw
  217.  
  218.  DynaComm (FutureSoft)
  219.         a=FileLocate("dynacomm.exe")                    ; Try brute force path search
  220.         if a=="" then a=IniRead("extensions","dcm","")  ; No? Try via [extensions] section
  221.         terminate(a=="","Error","Dynacomm not found")   ; Not installed normally
  222.         b=strindex(a," ",0,@FWDSCAN)                    ; Find first space
  223.         if b==0 then b=strlen(a)+1                      ; None? ...adjust b
  224.         b=strsub(a,1,b-1)                               ; Pick off ^.dcm stuff 
  225.         run(b,"")                                       ; Run Dynacomm
  226.  
  227.  Designer/Draw (Micrografx)
  228.         a=IniRead("extensions","drw","")                ; Try via [extensions] section
  229.         terminate(a=="","Error","Drawing tool not found") ; Not installed normally
  230.         b=strindex(a," ",0,@FWDSCAN)                    ; Find first space
  231.         if b==0 then b=strlen(a)+1                      ; None? ...adjust b
  232.         b=strsub(a,1,b-1)                               ; Pick off ^.drw stuff 
  233.         run(b,"")                                       ; Run DRW tool
  234.  
  235.  Excel (Microsoft)
  236.         a=FileLocate("excel.exe")                       ; Try brute force path search
  237.         if a=="" then a=IniRead("extensions","xls","")  ; No? Try via [extensions] section
  238.         terminate(a=="","Error","Excel not found")      ; Not installed normally
  239.         b=strindex(a," ",0,@FWDSCAN)                    ; Find first space
  240.         if b==0 then b=strlen(a)+1                      ; None? ...adjust b
  241.         b=strsub(a,1,b-1)                               ; Pick off ^.xls stuff 
  242.         run(b,"")                                       ; Run Excel
  243.  
  244.  PowerPoint (Microsoft)
  245.         a=FileLocate("powerpnt.exe")                    ; Try brute force path search
  246.         if a=="" then a=IniRead("extensions","ppt","")  ; No? Try via [extensions] section
  247.         terminate(a=="","Error","PowerPoint not found") ; Not installed normally
  248.         b=strindex(a," ",0,@FWDSCAN)                    ; Find first space
  249.         if b==0 then b=strlen(a)+1                      ; None? ...adjust b
  250.         b=strsub(a,1,b-1)                               ; Pick off ^.ppt stuff 
  251.         run(b,"")                                       ; Run PowerPoint
  252.  
  253.  Project (Microsoft)
  254.         a=FileLocate("winproj.exe")                     ; Try brute force path search
  255.         if a=="" then a=IniRead("extensions","mpp","")  ; No? Try via [extensions] section
  256.         terminate(a=="","Error","Project not found") ; Not installed normally
  257.         b=strindex(a," ",0,@FWDSCAN)                    ; Find first space
  258.         if b==0 then b=strlen(a)+1                      ; None? ...adjust b
  259.         b=strsub(a,1,b-1)                               ; Pick off ^.mpp stuff 
  260.         run(b,"")                                       ; Run PowerPoint
  261.  
  262.  Publisher (Microsoft)
  263.         a=FileLocate("mspub.exe")                       ; Try brute force path search
  264.         if a=="" then a=IniRead("extensions","pub","")  ; No? Try via [extensions] section
  265.         terminate(a=="","Error","Publisher not found") ; Not installed normally
  266.         b=strindex(a," ",0,@FWDSCAN)                    ; Find first space
  267.         if b==0 then b=strlen(a)+1                      ; None? ...adjust b
  268.         b=strsub(a,1,b-1)                               ; Pick off ^.pub stuff 
  269.         run(b,"")                                       ; Run Visual Basic
  270.  
  271.  Word For Windows (Microsoft)
  272.         a=FileLocate("winword.exe")                     ; Try brute force path search
  273.         if a=="" then a=IniRead("extensions","dot","")  ; No? Try via [extensions] section
  274.         terminate(a=="","Error","WinWord not found")    ; Not installed normally
  275.         b=strindex(a," ",0,@FWDSCAN)                    ; Find first space
  276.         if b==0 then b=strlen(a)+1                      ; None? ...adjust b
  277.         b=strsub(a,1,b-1)                               ; Pick off ^.dot stuff 
  278.         run(b,"")                                       ; Run WinWord
  279.  
  280.  Visual Basic (Microsoft)
  281.         a=FileLocate("vb.exe")                          ; Try brute force path search
  282.         if a=="" then a=IniRead("extensions","frm","")  ; No? Try via [extensions] section
  283.         terminate(a=="","Error","Visual Basic not found"); Not installed normally
  284.         b=strindex(a," ",0,@FWDSCAN)                    ; Find first space
  285.         if b==0 then b=strlen(a)+1                      ; None? ...adjust b
  286.         b=strsub(a,1,b-1)                               ; Pick off ^.frm stuff 
  287.         run(b,"")                                       ; Run Visual Basic
  288.  
  289. _Control &Panel
  290.         run("control.exe","")
  291.  
  292. &System Information
  293.        wintype="retail"
  294.        if WinMetrics(22) then wintype="debug"
  295.  
  296.         wc=WinConfig()
  297.         if !(wc&1) then mode="Real"
  298.         if wc&16 then mode="Standard"
  299.         if wc&32 then mode="Enhanced"
  300.  
  301.         if wc&2 then cpu=286
  302.         if wc&4 then cpu=386
  303.         if wc&8 then cpu=486
  304.         if wc&64 then cpu=8086
  305.         if wc&128 then cpu=80186
  306.  
  307.         Sysinfo=strcat(cpu,' ',mode,' ',wintype,' Windows ',WinVersion(1),'.',WinVersion(0),CR)
  308.  
  309.         math="No math"
  310.         if wc&1024 then math="Math"
  311.         mouse="No Mouse"
  312.         if WinMetrics(19) then mouse="Mouse"
  313.  
  314.         Sysinfo=strcat(sysinfo,math," co-processor.   ",mouse,' available.',CR)
  315.  
  316.         sysinfo=strcat(sysinfo,WinMetrics(0),'x',WinMetrics(1)," video resolution.  ",WinMetrics(-1),"  colors.",CR)
  317.  
  318.         ErrorMode(@OFF)
  319.         LastError()
  320.         PlayMedia("Status WaveForm Ready")
  321.         ErrorMode(@CANCEL)
  322.         if LastError()!=1193 then sysinfo=strcat(sysinfo,"Windows multimedia extensions present.",CR)
  323.  
  324.         bug=NetGetCaps(2)
  325.         if bug==0 then math="No n"
  326.         if bug!=0 then math="N"
  327.         if bug==256 then math="Microsoft n"
  328.         if bug==512 then math="Lan Manager n"
  329.         if bug==768 then math="Novell NetWare n"
  330.         if bug==1024 then math="Banyan Vines n"
  331.         if bug==1280 then math="10 Net n"
  332.         sysinfo=strcat(sysinfo,math,"etwork installed.",CR)
  333.  
  334.         bug=WinResources(0)/1024   ; Compute memory avail
  335.         math=strlen(bug)
  336.         if math>3 then bug=strcat(strsub(bug,1,math-3),',',strsub(bug,math-2,3))
  337.  
  338.         sysinfo=strcat(sysinfo,CR,bug," KB Free Memory",CR)
  339.         sysinfo=strcat(sysinfo,WinResources(2),"%% System Resources Free (",WinResources(3),"%% GDI, ",WinResources(4),"%% User)",CR)
  340.  
  341.         sysinfo=strcat(sysinfo,"DOS ",DosVersion(1),'.',DosVersion(0),"  using ",environment("COMSPEC"),CR)
  342.         disks=DiskScan(1)
  343.         if disks!="" then sysinfo=strcat(sysinfo,"Floppies ",disks,CR)
  344.         disks=DiskScan(2)
  345.         if disks!="" then sysinfo=strcat(sysinfo,"Hard Disks ",disks,CR)
  346.         disks=DiskScan(4)
  347.         if disks!="" then sysinfo=strcat(sysinfo,"Network Disks ",disks,CR)
  348.         sysinfo=strcat(sysinfo,"Windows Directory ",DirWindows(0),CR)
  349.         sysinfo=strcat(sysinfo,"System  Directory ",DirWindows(1),CR)
  350.         sysinfo=strcat(sysinfo,CR,"WIL Interpreter Ver ",VersionDll())
  351.  
  352.         ver=Version()
  353.         Message("File Commander %ver% SysInfo",Sysinfo)
  354.  
  355.     
  356.